<?php 
$mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
if (!$mysqli->set_charset("utf8")) {printf("Error loading character set utf8: %s\n", $mysqliTwo->error);}
$param=explode('?', $urlPath[1]);
$cid=preg_replace('/.html|c/', '', $param[0]);
if(0 == $cid){$cid=33;}
$page=1;
if (isset($param[1])){
    $param2=explode('=', $param[1]);
    $page=$param2[1];
}
$sql="select id,typename,dirname from ey_arctype ";
$query = $mysqli->query($sql);
$catList=array();
if($query->num_rows>0){
    while ($list=$query->fetch_assoc()){
        if(strpos($list['typename'],'en') !== false){}else{
            $catList[$list['id']]=$list;
        }
    }
}
$pageSize=52;
$query_count =$mysqli->query("select count(aid) as count from ey_archives where typeid='".$cid."' ");
$row=$query_count->fetch_array();
$total=$row['count'];
$total_page=1;
if ($total) {
    if($total % $pageSize){
        $total_page=(int)($total/$pageSize)+1;
    }else{
        $total_page=($total/$pageSize);
    }
}

 

$sql="select aid,title,logo from ey_archives where typeid='".$cid."' order by aid limit ".($page-1)*$pageSize.", $pageSize ";
$query = $mysqli->query($sql);
$getData=array();
if($query->num_rows>0){
    while ($list=$query->fetch_assoc()){
        $getData[]=$list;
    }
}

$mysqli->close();
include $cmsPath.'/template/pc/category.php';

 